<template>
	<view class="wrap">
		<view class="topSearch u-flex">
			<view class="dateTime">
				<text>视屏名称：</text>
				<input v-model="videoName"/>
				<u-button style="margin-left:10rpx;" type="primary" size="mini">查询</u-button>
			</view>
			<view class="u-text-right u-flex-1">	
				<u-button type="success" size="mini" @click="addPage('pages/workbench/trainmode/classroom/add')">新增视屏</u-button>
			</view>
		</view>
		<view class="list">
			<view class="item" @click="addPage('pages/workbench/trainmode/classroom/detail')">
				<view class="box">
					<image src="@/static/images/video.jpeg" mode="widthFix"/></image>
					<view class="info">
						这边是视屏名称
					</view>
				</view>
			</view>
			<view class="item" @click="addPage('pages/workbench/trainmode/classroom/detail')">
				<view class="box">
					<image src="@/static/images/video.jpeg" mode="widthFix"/></image>
					<view class="info">
						这边是视屏名称
					</view>
				</view>
			</view>
			<view class="item" @click="addPage('pages/workbench/trainmode/classroom/detail')">
				<view class="box">
					<image src="@/static/images/video.jpeg" mode="widthFix"/></image>
					<view class="info">
						这边是视屏名称
					</view>
				</view>
			</view>
			<view class="item" @click="addPage('pages/workbench/trainmode/classroom/detail')">
				<view class="box">
					<image src="@/static/images/video.jpeg" mode="widthFix"/></image>
					<view class="info">
						这边是视屏名称
					</view>
				</view>
			</view>
		</view>
		<u-picker mode="time" v-model="timerShow" :params="params" @confirm="timerConfirm"></u-picker>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				videoName:"",
				timerShow:false,
				params:{
					year: true,
					month: true,
					day: true,
				}
			}
		},
		methods:{
			addPage(url){
				this.$u.route({
					url: url
				});
			},
			timerConfirm(e){
				
				this.myDate = `${e.year}-${e.month}-${e.day}`
			}
		}
	}
</script>

<style lang="scss" scoped>
.topSearch{
	padding:20rpx;
	.dateTime{
		line-height: 56rpx;
		font-size:22rpx;
		text{
			float:left;
		}
		input{
			font-size:22rpx;
			float:left;
			width: 200rpx;
			height:56rpx;
			line-height: 56rpx;
			padding:0 10rpx;
			border:1px solid #d9d9d9;
			border-radius:0.3em;
		}
	}
}
.list{
	overflow: hidden;
	padding:10rpx;
	.item{
		width: 50%;
		float:left;
		padding:10rpx;
		.box{
			box-shadow: 0 0 5px rgba(0,0,0,0.3);
			border-radius:0.3em;
			overflow: hidden;
			image{
				width: 100%;
			}
		}
		.info{
			padding: 16rpx;
			overflow: hidden;
			.name{
				float:left;
				font-size:24rpx;
			}
			.status{
				float: right;
				font-size:22rpx;
				&.green{
					color:#19BE6B;
				}
				&.red{
					color:#FA3534;
				}
				&.blue{
					color:#2979FF;
				}
			}
		}
	}
}
</style>
